package pres.liko.iot.blackip.service;

import pres.liko.iot.bean.R;
import pres.liko.iot.blackip.pojo.Dc3BlackIp;
import reactor.core.publisher.Mono;

import java.util.Set;

/**
 * @ClassName: BlackIpService
 * @Auther: liko
 * @Description:
 * @Date: 2022/11/1 16:38
 */
public interface BlackIpService {
    /**
     * 添加黑名单
     *
     * @return
     */
    Mono<R<Object>> addIp(Mono<Dc3BlackIp> blackIpMono);

    /**
     * 返回的是所有可用的ip
     *
     * @return
     */
    Mono<R<Set<String>>> findAllEnable();

    /**
     * 删除按照ip
     *
     * @param id
     * @return
     */
    Mono<R<Object>> deleteIp(String id);

    /**
     * 逻辑删除
     *
     * @param id
     * @return
     */
    Mono<R<Object>> updateEnableById(String id, Integer enable);

    /**
     * 逻辑删除
     *
     * @param id
     * @return
     */
    Mono<R<Object>> updateDeletedById(String id);

    /**
     * 修改全部
     *
     * @param blackIpMono
     * @return
     */
    Mono<R<Object>> updateIp(Mono<Dc3BlackIp> blackIpMono);
}
